<?php
/**
 * @file
 * Views definitions for mymodule module.
 */

/**
 * Implements hook_views_data().
 */
function jessica_stylebook_views_data() {
    $data = array();

    $data['article_stylebook']['table']['group'] = t('Article Showbook');
    $data['article_stylebook']['table']['join'] = array(
        // Exist in all views.
        '#global' => array(),
    );

    $data['article_stylebook']['style_article_thumbnail_item'] = array(
        'title' => t('Style Article Thumbnail Item in JSON'),
        'help' => t('Output a div with data atrribute of base64 encode JSON.'),
        'field' => array(
            'handler' => 'jessica_stylebook_handler_style_item',
        ),
    );

    $data['article_stylebook']['style_article_colours'] = array(
        'title' => t('Style Article Colours'),
        'help' => t('Output divs with background colours of the individual first items colour.'),
        'field' => array(
            'handler' => 'jessica_stylebook_handler_article_colours',
        ),
    );

    $data['article_stylebook']['style_article_thumbnail_item_brand'] = array(
        'title' => t('Style Article select thumbnail item brand'),
        'help' => t('Output the brand of the selected thumbnail item.'),
        'field' => array(
            'handler' => 'jessica_stylebook_handler_style_thumbnail_item_brand',
        ),
    );

    $data['article_stylebook']['style_article_item_buy_link'] = array(
        'title' => t('Style Article Item buy link'),
        'help' => t('Output the buy link or item detail depending if buy url is set.'),
        'field' => array(
            'handler' => 'jessica_stylebook_handler_style_item_listing_buy_link',
        ),
    );

    $data['article_stylebook']['style_item_latest_article'] = array(
        'title' => t('Latest Style Articles of Style Item'),
        'help' => t('Output the latest 2 style article the current style item is featured in'),
        'field' => array(
            'handler' => 'jessica_stylebook_handler_style_item_latest_article',
        ),
    );

    $data['article_stylebook']['style_item_article_count'] = array(
        'title' => t('Style Articles Count of Style Item'),
        'help' => t('Output the style article count featured with the current item'),
        'field' => array(
            'handler' => 'jessica_stylebook_handler_style_item_article_count',
        ),
    );

    $data['article_stylebook']['looking_for_more_buy_link'] = array(
        'title' => t('Looking for More buy link'),
        'help' => t('Output Looking for More buy link or ttem detail link'),
        'field' => array(
            'handler' => 'jessica_stylebook_handler_looking_for_more_buy_link',
        ),
    );




    return $data;
}
